<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>v-model</title>
    <h1>v-model</h1>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 引入vue.js -->
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
    <div id="box">
        {{ message }}
        <br>
        <input type="text" v-model="message" />
    </div>
    <script>
        var box = new Vue({
            el: '#box',
            data: {
                message: 'Hello World!'
            }
        })

        box.message = "Hello LY"
    </script>

</body>

</html>